Crate rome_diagnostics
source ·Re-exports
pub use termcolor;
pub use crate::advice::Advices;
pub use crate::advice::CodeFrameAdvice;
pub use crate::advice::CommandAdvice;
pub use crate::advice::DiffAdvice;
pub use crate::advice::LogAdvice;
pub use crate::advice::LogCategory;
pub use crate::advice::Visit;
pub use crate::context::Context;
pub use crate::context::DiagnosticExt;
pub use crate::diagnostic::Diagnostic;
pub use crate::diagnostic::DiagnosticTags;
pub use crate::diagnostic::Severity;
pub use crate::display::set_bottom_frame;
pub use crate::display::Backtrace;
pub use crate::display::MessageAndDescription;
pub use crate::display::PrintDescription;
pub use crate::display::PrintDiagnostic;
pub use crate::error::Error;
pub use crate::error::Result;
pub use crate::location::LineIndex;
pub use crate::location::LineIndexBuf;
pub use crate::location::Location;
pub use crate::location::Resource;
pub use crate::location::SourceCode;
Modules
- This modules exposes a number of “adapter diagnostics” that wrap error types such as std::error::Error or std::io::Error in newtypes implementing the Diagnostic trait
- The
error
module contains the implementation of Error, a dynamic container struct for any type implementing Diagnostic. - Anonymously re-exports all the traits declared by this module, this is intended to be imported as
use rome_diagnostics::prelude::*;
to automatically bring all these traits into the ambient context
Macros
- The
category!
macro can be used to statically lookup a category by name from the registry - The
category_concat!
macro is a variant ofcategory!
using a slightly different syntax, for use in thedeclare_group
anddeclare_rule
macros in the analyzer
Structs
- Metadata for a diagnostic category
- A Suggestion that is provided by Rome’s linter, and can be reported to the user, and can be automatically applied if it has the right
Applicability
.
Enums
- Indicates how a tool should manage this suggestion.
Constants
Functions
- Utility function for testing purpose. The function will print an Error to a string, which is then returned by the function.